package control;

import javax.microedition.lcdui.Font;
import javax.microedition.lcdui.Graphics;

public class Control {
	static int COLOR_BACK = 0xD27E02;
	static int COLOR_PRESSED = 0xA96501;
	static int COLOR_FORE = 0x543201;
	static int COLOR_TEXT = 0x110A00;
	protected static Font fontB = Font.getFont(Font.FACE_PROPORTIONAL, Font.STYLE_BOLD, Font.SIZE_MEDIUM);
	protected static Font font = Font.getFont(Font.FACE_SYSTEM, Font.STYLE_PLAIN, Font.SIZE_SMALL); 
	
	private boolean isVisible = true;
	protected ControlCommand command;
	public void setVisible(boolean visible)
	{
		isVisible = visible;
	}
	public void toggleVisible()
	{
		setVisible(!visible());
	}
	public void setCommand(ControlCommand command)
	{
		this.command = command;
		//font.stringWidth(arg0)
	}
	public boolean pointerPressed(int x,int y)
	{
		return false;
	}
	
	public boolean pointerReleased(int x,int y)
	{
		return false;
	}
	final public void paint(Graphics g)
	{
		if(visible())
		{
			
			controlPaint(g);
		}
	}
	protected void controlPaint(Graphics g)
	{
		
	}
	public boolean visible() {
		return isVisible;
	}
	
}
